package com.wan.lession.services.impl;

import com.wan.lession.dao.EmpMapper;
import com.wan.lession.entity.Emp;
import com.wan.lession.services.EmpServices;

import java.util.List;

public class EmpServicesImpl implements EmpServices {

    private EmpMapper empMapper;

    @Override
    public List<Emp> getAll() {
        System.out.println("这个是empservices 在调用Empmapper实现类的方法");
        return empMapper.getAll();
    }

    @Override
    public void show() {
        System.out.println("这个是services的show方法");
    }

    @Override
    public int add() {
        System.out.println("这个是services的add方法");
        return 10000;
    }

    @Override
    public void update() {
        System.out.println("这个是services的update方法");

    }

    @Override
    public void del() {
        System.out.println("这个是services的del方法");
    }


    @Override
    public String getMsg(){
        System.out.println("这个是getMsg");
        System.out.println(10/0);
        return "hello";
    }

    public EmpMapper getEmpMapper() {
        return empMapper;
    }

    public void setEmpMapper(EmpMapper empMapper) {
        this.empMapper = empMapper;
    }
}
